From: Florian Müllner Date: Thu, 3 Sep 2026 17:13:37 +0000 (+0200) Subject: messageList: Pass tracked object to connectObject() calls X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~6^2^2~30 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8700b7aac6ea0d6cbed5bd40ee7322ce048cce09;p=gnome-shell.git messageList: Pass tracked object to connectObject() calls Otherwise the handler will be associated with the `globalThis` object and never get disconnected automatically. Part-of: (cherry picked from commit a939de4ad783767f97bf2c62023ca641c7736225) --- diff --git a/js/ui/messageList.js b/js/ui/messageList.js index 3c5adbc94..cf9e501d0 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -58,7 +58,8 @@ class URLHighlighter extends St.Label { this._clickGesture = new Clutter.ClickGesture(); this._clickGesture.connectObject( 'recognize', this._onClick.bind(this), - 'may-recognize', this._checkInUrl.bind(this)); + 'may-recognize', this._checkInUrl.bind(this), + this); this.add_action(this._clickGesture); } @@ -2016,7 +2017,9 @@ const FadeEffect = GObject.registerClass({ this._vadjustment?.disconnectObject(this); this._vadjustment = newAdj; - this._vadjustment?.connectObject('changed', this._updateEnabled.bind(this)); + this._vadjustment?.connectObject( + 'changed', this._updateEnabled.bind(this), + this); this._updateEnabled(); } @@ -2026,7 +2029,9 @@ const FadeEffect = GObject.registerClass({ this.actor?.disconnectObject(this); - actor?.connectObject('notify::vadjustment', this._vadjustmentChanged.bind(this)); + actor?.connectObject( + 'notify::vadjustment', this._vadjustmentChanged.bind(this), + this); super.vfunc_set_actor(actor); this._vadjustmentChanged(); }